@extends('layouts.'.getTheme())
@section('css')
<link href="{{asset(getThemeAssets('iCheck/custom.css', true))}}" rel="stylesheet">
<style type="text/css">
	.timeline-item p{
        font-size: 15px;
    }
    .timeline-item i,small{
        font-size: 14px;
    }
</style>
@endsection
@section('content')
<div class="row wrapper border-bottom white-bg page-heading">
  <div class="col-lg-10">
    <h2>{!!trans('alarmsetting.edit_title')!!}</h2>
    <ol class="breadcrumb">
        <li>
            <a href="{{url('admin')}}">{!!trans('home.title')!!}</a>
        </li>
        <li>
            <a href="{{route('alarmsetting.index')}}">{!!trans('alarmsetting.title')!!}</a>
        </li>
        <li>
            {!!trans('alarmsetting.edit_title')!!}
        </li>
        <li class="active">
            <!-- <strong>{!!trans('common.create').trans('user.slug')!!}</strong> -->
        </li>
    </ol>
  </div>
  <div class="col-lg-2">
    <div class="title-action">
      <a class="btn btn-white" href="{{route('alarmsetting.index')}}"><i class="fa fa-reply"></i>  {!!trans('common.cancel')!!}</a>
    </div>
  </div>
</div>
<div class="wrapper wrapper-content animated">
  <div class="row">
    <div class="col-lg-12">
      <div class="ibox float-e-margins">
        <div class="ibox-title">
          <h5>{!!trans('common.create').trans('alarmsetting.edit_title')!!}</h5>
          <div class="ibox-tools">
              <a class="collapse-link">
                  <i class="fa fa-chevron-up"></i>
              </a>
              <a class="close-link">
                  <i class="fa fa-times"></i>
              </a>
          </div>
        </div>
        <div class="ibox-content">
          @include('flash::message')
          <form method="post" action="{{route('alarmsetting.update', [encodeId($monitor->monitor_id, 'alarmsetting')])}}" class="form-horizontal">
            {{csrf_field()}}
            {{method_field('PUT')}}
            <div class="form-group{{ $errors->has('monitor_id') ? ' has-error' : '' }}">
              <label class="col-sm-2 control-label">{{trans('alarmsetting.monitor_id')}}</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" name="monitor_id" value="{{old('monitor_id', $monitor->monitor_id)}}" placeholder="{{trans('alarmsetting.monitor_id')}}" readonly="true"> 
                @if ($errors->has('monitor_id'))
                <span class="help-block m-b-none text-danger">{{ $errors->first('monitor_id') }}</span>
                @endif
              </div>
            </div>
            <div class="form-group{{ $errors->has('loop_name') ? ' has-error' : '' }}">
              <label class="col-sm-2 control-label">{{trans('alarmsetting.loop_name')}}</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" name="loop_name" value="{{old('loop_name', $monitor->loop_name)}}" placeholder="{{trans('alarmsetting.loop_name')}}" readonly="true"> 
                @if ($errors->has('loop_name'))
                <span class="help-block m-b-none text-danger">{{ $errors->first('loop_name') }}</span>
                @endif
              </div>
            </div>
            <div class="form-group{{ $errors->has('resi_current') ? ' has-error' : '' }}">
              <label class="col-sm-2 control-label">{{trans('alarmsetting.resi_current')}}</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" name="resi_current" value="{{old('resi_current', $monitor->resi_current)}}" placeholder="{{trans('alarmsetting.resi_current')}}"> 
                @if ($errors->has('resi_current'))
                <span class="help-block m-b-none text-danger">{{ $errors->first('resi_current') }}</span>
                @endif
              </div>
            </div>
            <div class="form-group{{ $errors->has('cable_temp') ? ' has-error' : '' }}">
              <label class="col-sm-2 control-label">{{trans('alarmsetting.cable_temp')}}</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" name="cable_temp" value="{{old('cable_temp', $monitor->cable_temp)}}" placeholder="{{trans('alarmsetting.cable_temp')}}"> 
                @if ($errors->has('cable_temp'))
                <span class="help-block m-b-none text-danger">{{ $errors->first('cable_temp') }}</span>
                @endif
              </div>
            </div>
            <div class="form-group{{ $errors->has('smoke') ? ' has-error' : '' }}">
              <label class="col-sm-2 control-label">{{trans('alarmsetting.smoke')}}</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" name="smoke" value="{{old('smoke', $monitor->smoke)}}" placeholder="{{trans('alarmsetting.smoke')}}"> 
                @if ($errors->has('smoke'))
                <span class="help-block m-b-none text-danger">{{ $errors->first('smoke') }}</span>
                @endif
              </div>
            </div>
            <div class="form-group{{ $errors->has('fire') ? ' has-error' : '' }}">
              <label class="col-sm-2 control-label">{{trans('alarmsetting.fire')}}</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" name="fire" value="{{old('fire', $monitor->fire)}}" placeholder="{{trans('alarmsetting.fire')}}"> 
                @if ($errors->has('fire'))
                <span class="help-block m-b-none text-danger">{{ $errors->first('fire') }}</span>
                @endif
              </div>
            </div>
            <div class="form-group{{ $errors->has('near_infrared') ? ' has-error' : '' }}">
              <label class="col-sm-2 control-label">{{trans('alarmsetting.near_infrared')}}</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" name="near_infrared" value="{{old('near_infrared', $monitor->near_infrared)}}" placeholder="{{trans('alarmsetting.near_infrared')}}"> 
                @if ($errors->has('near_infrared'))
                <span class="help-block m-b-none text-danger">{{ $errors->first('near_infrared') }}</span>
                @endif
              </div>
            </div>
            <div class="hr-line-dashed"></div>
            <div class="form-group">
              <div class="col-sm-4 col-sm-offset-2">
                  <a class="btn btn-white" href="{{route('alarmsetting.index')}}">{!!trans('common.cancel')!!}</a>
                  @if(haspermission('alarmsetting.update'))
                  <button class="btn btn-primary" type="submit">{!!trans('common.edit')!!}</button>
                  @endif
              </div>
            </div>
          </form>
          </div>
        </div>
       </div>
     </div>
   </div>
@endsection
@include(getThemeView('user.modal'))
@section('js')
<script type="text/javascript" src="{{asset(getThemeAssets('iCheck/icheck.min.js', true))}}"></script>
<script type="text/javascript" src="{{asset(getThemeAssets('js/check.js'))}}"></script>
@endsection